<?php

/**
 * Evenement form base class.
 *
 * @package    sinc
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseEvenementForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_evenement'  => new sfWidgetFormInputHidden(),
      'titre'         => new sfWidgetFormInput(),
      'description'   => new sfWidgetFormInput(),
      'date_creation' => new sfWidgetFormDateTime(),
      'date'          => new sfWidgetFormDateTime(),
      'visible'       => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id_evenement'  => new sfValidatorPropelChoice(array('model' => 'Evenement', 'column' => 'id_evenement', 'required' => false)),
      'titre'         => new sfValidatorString(array('max_length' => 100)),
      'description'   => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'date_creation' => new sfValidatorDateTime(array('required' => false)),
      'date'          => new sfValidatorDateTime(array('required' => false)),
      'visible'       => new sfValidatorInteger(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('evenement[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Evenement';
  }


}
